package com.hrpmar.pojo;


import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Worker extends BasePojo {

  private Integer woId;             //序号
  private String woJubnum;          //人员工号
  private String landCode;          //拼音码(登陆名)
  private String woName;            //人员姓名
  private String landPwd;           //登录密码
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date landDate;            //登陆日期
  private Integer landState;          //登录状态 0:启用 1:禁用
  private Integer roleId;             //角色id
  private Integer workLife;           //工作年限
  private int woSex;                  //性别
  private String woIdentityCard;      //身份证
  private String woEducation;         //学历
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date woBirthday;            //出生日期
  private String woNation;            //民族
  private String woNationality;       //国籍
  private String woResidence;         //户口地址
  private Integer woMaritalstate;      //婚姻状态 0:已婚 1:未婚
  private String woAddress;             //现住址
  private String woPhone;               //电话
  private String woCeavatar;            //证件头像
  private String woPerExplain;         //个人说明
  private String woEmail;               //邮箱

  private Role role;

  public String getWoEmail() {
    return woEmail;
  }


  public void setWoEmail(String woEmail) {
    this.woEmail = woEmail;
  }

  public Integer getWoId() {
    return woId;
  }

  public void setWoId(Integer woId) {
    this.woId = woId;
  }

  public String getWoJubnum() {
    return woJubnum;
  }

  public void setWoJubnum(String woJubnum) {
    this.woJubnum = woJubnum;
  }

  public String getLandCode() {
    return landCode;
  }

  public void setLandCode(String landCode) {
    this.landCode = landCode;
  }

  public String getWoName() {
    return woName;
  }

  public void setWoName(String woName) {
    this.woName = woName;
  }

  public String getLandPwd() {
    return landPwd;
  }

  public void setLandPwd(String landPwd) {
    this.landPwd = landPwd;
  }

  public Date getLandDate() {
    return landDate;
  }
  public String getAge(){
    Date dd = new Date();
    if(woBirthday!=null){
      int year = dd.getYear()-woBirthday.getYear();
      return year+"";
    }
    return "-";
  }
  public void setLandDate(Date landDate) {
    this.landDate = landDate;
  }

  public Integer getLandState() {
    return landState;
  }

  public void setLandState(Integer landState) {
    this.landState = landState;
  }

  public Integer getRoleId() {
    return roleId;
  }

  public void setRoleId(Integer roleId) {
    this.roleId = roleId;
  }

  public Integer getWorkLife() {
    return workLife;
  }

  public void setWorkLife(Integer workLife) {
    this.workLife = workLife;
  }

  public int getWoSex() {
    return woSex;
  }

  public void setWoSex(int woSex) {
    this.woSex = woSex;
  }

  public String getWoIdentityCard() {
    return woIdentityCard;
  }

  public void setWoIdentityCard(String woIdentityCard) {
    this.woIdentityCard = woIdentityCard;
  }

  public String getWoEducation() {
    return woEducation;
  }

  public void setWoEducation(String woEducation) {
    this.woEducation = woEducation;
  }

  public Date getWoBirthday() {
    return woBirthday;
  }

  public void setWoBirthday(Date woBirthday) {
    this.woBirthday = woBirthday;
  }

  public String getWoNation() {
    return woNation;
  }

  public void setWoNation(String woNation) {
    this.woNation = woNation;
  }

  public String getWoNationality() {
    return woNationality;
  }

  public void setWoNationality(String woNationality) {
    this.woNationality = woNationality;
  }

  public String getWoResidence() {
    return woResidence;
  }

  public void setWoResidence(String woResidence) {
    this.woResidence = woResidence;
  }

  public Integer getWoMaritalstate() {
    return woMaritalstate;
  }

  public void setWoMaritalstate(Integer woMaritalstate) {
    this.woMaritalstate = woMaritalstate;
  }

  public String getWoAddress() {
    return woAddress;
  }

  public void setWoAddress(String woAddress) {
    this.woAddress = woAddress;
  }

  public String getWoPhone() {
    return woPhone;
  }

  public void setWoPhone(String woPhone) {
    this.woPhone = woPhone;
  }

  public String getWoCeavatar() {
    return woCeavatar;
  }

  public void setWoCeavatar(String woCeavatar) {
    this.woCeavatar = woCeavatar;
  }

  public String getWoPerExplain() {
    return woPerExplain;
  }

  public void setWoPerExplain(String woPerExplain) {
    this.woPerExplain = woPerExplain;
  }

  public Role getRole() {
    return role;
  }

  public void setRole(Role role) {
    this.role = role;
  }

  @Override
  public String toString() {
    return "Worker{" +
            "woId=" + woId +
            ", woJubnum='" + woJubnum + '\'' +
            ", landCode='" + landCode + '\'' +
            ", woName='" + woName + '\'' +
            ", landPwd='" + landPwd + '\'' +
            ", landDate=" + landDate +
            ", landState=" + landState +
            ", roleId=" + roleId +
            ", workLife=" + workLife +
            ", woSex=" + woSex +
            ", woIdentityCard='" + woIdentityCard + '\'' +
            ", woEducation='" + woEducation + '\'' +
            ", woBirthday=" + woBirthday +
            ", woNation='" + woNation + '\'' +
            ", woNationality='" + woNationality + '\'' +
            ", woResidence='" + woResidence + '\'' +
            ", woMaritalstate=" + woMaritalstate +
            ", woAddress='" + woAddress + '\'' +
            ", woPhone='" + woPhone + '\'' +
            ", woCeavatar='" + woCeavatar + '\'' +
            ", woPerExplain='" + woPerExplain + '\'' +
            ", role=" + role +
            '}';
  }
}